#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
    @version: 0.0.1
    @author: Boxi Ro 
    @license: Apache Licence 
    @contact: ygroup@gmail.com
    @site: https://gitee.com/boxigg/boxquant
    @software: PyCharm
    @file: tick_stra.py
    @time: 2019/11/7 
    
    功能说明: 基于 Ticks 的策略
    使用说明
    使用例子
    """

from strategy.istrategy import IStrategy


class Stra(IStrategy):
    def __init__(self, parent=None, stra_ee=None, period=0, params=None, setting=None, data_ee=None):
        super(Stra, self).__init__(parent, stra_ee, period, params, setting, data_ee)

    def on_ticks(self, ticks, **kwargs):
        """
        基于历史数据计算相关指标及策略信号
        :param ticks:
        :return:
        """
        super().on_ticks(ticks, **kwargs)

    def on_tick(self, tick, **kwargs):
        """
        根据即时数据及计算出的指标计算策略信号
        :param tick:
        :param kwargs:
        :return:
        """


def main():
    pass


if __name__ == '__main__':
    main()
